package cn.itcast.bos.web.Dao.base;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.base.Standard;

public interface StandardRepository extends JpaRepository<Standard, Integer> {

	// 根据基础收派 进行查询 第一种
	public List<Standard> findByName(String name);

	@Query(value = "from  Standard  where name=?", nativeQuery = false)
	public List<Standard> queryName(String name);
//自定义语句
	// 修改数据
	@Query(value = "update Standard set minLength=? where id=?")
	@Modifying
	public void updataStandard(Integer id, Integer minLength);

}
